﻿using FineAdmin.IService;
using FineAdmin.Model;
using FineAdmin.Web.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FineAdmin.Web.Areas.Shop.Controllers
{
    public class RushSetController : BaseController
    {
        // GET: Shop/RushSet

        public IRushService RushService { get; set; }
        public override ActionResult Index(int? id)
        {
            base.Index(id);
            return View();
        }
        [HttpGet]
        public JsonResult List(RushModel model, PageInfo pageInfo)
        {
            var result = RushService.GetListByFilter(model, pageInfo);
            return Json(result, JsonRequestBehavior.AllowGet);
        }

        [HttpGet]
        public JsonResult CreateData()
        {
            var result = RushService.CreateData() > 0 ? SuccessTip("成功") : ErrorTip("失败");
            return Json(result, JsonRequestBehavior.AllowGet);
        }
    }
}